import request from '@/config/axios'

// 双选申请解除 VO
export interface DoubleChoiceRecallVO {
  id: number // 主键
  batchId: string // 计划ID
  recruitStudentId: string // 招生学生主键
  studentId: number // 学生ID
  choiceId: number // 双选ID
  reason: string // 申请原因
  recallStatus: string // 状态 待审核|已通过|已拒绝
  recallTime: Date // 审批时间
  remark: string // 备注
}

export interface DoubleChoiceRecallListRespVO {
  id: number // 主键
  batchId: string // 计划ID
  recruitStudentId: string // 招生学生主键
  studentId: number // 学生ID
  choiceId: number // 双选ID
  reason: string // 申请原因
  recallStatus: string // 状态 待审核|已通过|已拒绝
  recallTime: Date // 审批时间
  remark: string // 备注

  accountId: number
  studentName: string
  recruitType: string
  phone: string
  recruitStatus: string
  recruitTime: Date
  interviewQuality: string
  interviewSelected: boolean
  interviewDate: Date
  interviewTime: string
  interviewStatus: string
  interviewId: string
  interviewGroupId: string
  interviewSlotId: number
  interviewSlotTime: string
  interviewScore: number
  chioceStatus: string
  chioceMentorId: number
  birthdate: Date
  gender: string
  politicalStatus: string
  ethnic: string
  identityNumber: string
  contactAddress: string
  email: string
  university: string
  is985: boolean
  is211: boolean
  isFirstClass: boolean
  studyMajor: string
  applyMajor: string
  majorRank: number
  majorTotal: number
  classRank: number
  classTotal: number
  cet4Score: number
  cet6Score: number
  attachment: string
}

// 双选申请解除 API
export const DoubleChoiceRecallApi = {
  // 查询双选申请解除分页
  getDoubleChoiceRecallPage: async (params: any) => {
    return await request.get({ url: `/recruit/double-choice-recall/page`, params })
  },

  // 查询双选申请解除详情
  getDoubleChoiceRecall: async (id: number) => {
    return await request.get({ url: `/recruit/double-choice-recall/get?id=` + id })
  },

  // 新增双选申请解除
  createDoubleChoiceRecall: async (data: DoubleChoiceRecallVO) => {
    return await request.post({ url: `/recruit/double-choice-recall/create`, data })
  },

  // 修改双选申请解除
  updateDoubleChoiceRecall: async (data: DoubleChoiceRecallVO) => {
    return await request.put({ url: `/recruit/double-choice-recall/update`, data })
  },

  // 删除双选申请解除
  deleteDoubleChoiceRecall: async (id: number) => {
    return await request.delete({ url: `/recruit/double-choice-recall/delete?id=` + id })
  },

  // 导出双选申请解除 Excel
  exportDoubleChoiceRecall: async (params) => {
    return await request.download({ url: `/recruit/double-choice-recall/export-excel`, params })
  },

  // 查询双选申请解除分页(业务)
  viewDoubleChoiceRecallPage: async (params: any) => {
    return await request.get({ url: `/recruit/double-choice-recall/view`, params })
  },

  // 审批双选申请解除
  auditDoubleChoiceRecall: async (data: Partial<DoubleChoiceRecallVO>) => {
    return await request.put({ url: `/recruit/double-choice-recall/audit`, data })
  }
}
